package com.eu.ebpm.engine.util;

import java.util.HashMap;
import java.util.Map;

import com.eu.ebpm.engine.pvm.EngineServiceType;

/**
 * @author wxh
 */
@Deprecated
public class EngineServiceTypeHelper {

	private static Map<String, EngineServiceType> engineTypeMap;
	
	static {
		engineTypeMap = new HashMap<String, EngineServiceType>();
		engineTypeMap.put("END_EVENT", EngineServiceType.END_EVENT);
		engineTypeMap.put("FORK_AFTER", EngineServiceType.FORK_AFTER);
		engineTypeMap.put("FORK_BEFORE", EngineServiceType.FORK_BEFORE);
		engineTypeMap.put("FORK_TASK", EngineServiceType.FORK_TASK);
		engineTypeMap.put("LANE_AFTER", EngineServiceType.LANE_AFTER);
		engineTypeMap.put("LANE_BEFORE", EngineServiceType.LANE_BEFORE);
		engineTypeMap.put("LANE_TASK", EngineServiceType.LANE_TASK);
		engineTypeMap.put("SERVICE_TASK", EngineServiceType.SERVICE_TASK);
		engineTypeMap.put("START_EVENT", EngineServiceType.START_EVENT);
		engineTypeMap.put("USER_TASK", EngineServiceType.USER_TASK);
		engineTypeMap.put("LANE_FORKTASK", EngineServiceType.LANE_FORKTASK);
		engineTypeMap.put("SUB_START_EVENT", EngineServiceType.SUB_START_EVENT);
		engineTypeMap.put("SUB_END_EVENT", EngineServiceType.SUB_END_EVENT);
		
		engineTypeMap.put("StartEvent", EngineServiceType.START_EVENT);
		engineTypeMap.put("EndEvent", EngineServiceType.END_EVENT);
		engineTypeMap.put("UserTask", EngineServiceType.USER_TASK);
		engineTypeMap.put("ServiceTask", EngineServiceType.SERVICE_TASK);
		engineTypeMap.put("SubStartEvent", EngineServiceType.SUB_START_EVENT);
		engineTypeMap.put("SubEndEvent", EngineServiceType.SUB_END_EVENT);
		engineTypeMap.put("ForkBefore", EngineServiceType.FORK_BEFORE);
		engineTypeMap.put("ForkAfter", EngineServiceType.FORK_AFTER);
		engineTypeMap.put("LaneBefore", EngineServiceType.LANE_BEFORE);
		engineTypeMap.put("LaneTask", EngineServiceType.LANE_TASK);
		engineTypeMap.put("LaneAfter", EngineServiceType.LANE_AFTER);
		
	}
	
	public static EngineServiceType get(String type) {
		return engineTypeMap.get(type);
	}
	
}
